arm: imx: hab: Optimise flow of authenticate_image on hab_entry fail
authorBryan O'Donoghue <[email protected]>
Fri, 12 Jan 2018 12:39:58 +0000 (12:39 +0000)
committerStefano Babic <[email protected]>
Sun, 14 Jan 2018 16:26:30 +0000 (17:26 +0100)
commit53c8a510e72a87aa1d6eda48c5462b01a215e518
tree92054fb768aa1b7c56f1fa1e96bfac548abeb5a7
parentd2c61800fc1ece786799262c71d4789b0fa56279
arm: imx: hab: Optimise flow of authenticate_image on hab_entry fail

The current code disjoins an entire block of code on hab_entry pass/fail
resulting in a large chunk of authenticate_image being offset to the right.

Fix this by checking hab_entry() pass/failure and exiting the function
directly if in an error state.

Signed-off-by: Bryan O'Donoghue <[email protected]>
Cc: Stefano Babic <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Albert Aribaud <[email protected]>
Cc: Sven Ebenfeld <[email protected]>
Cc: George McCollister <[email protected]>
Cc: Breno Matheus Lima <[email protected]>
Tested-by: Breno Lima <[email protected]>
Reviewed-by: Fabio Estevam <[email protected]>
arch/arm/mach-imx/hab.c